package rim;

import java.util.ArrayList;
import java.util.List;

import datatypes.r2.basic.CD;
import datatypes.r2.basic.CS;
import datatypes.r2.flavors.INT_NONNEG;
import datatypes.r2.flavors.INT_POS;

public class Acknowledgement extends InfrastructureRoot {

	private static final long serialVersionUID = 1L;
	/**
	 * Definition: The acknowledgement as defined in an enumerated set of
	 * acknowledgement types.
	 * 
	 * 在确认类型的枚举定义的确认。
	 * 
	 * 
	 * Examples:
	 * 
	 * The receiving application successfully processed message; the receiving
	 * application found error(s) in message
	 * 
	 * 接收应用程序成功处理的消息，接收应用程序中发现的错误消息（S）
	 */
	private CS typeCode;
	/**
	 * Definition: The sequence number of the message within a set of messages.
	 * 
	 * 消息序列号内的一组消息。
	 */
	private INT_POS expectedSequenceNumber;
	/**
	 * Definition: The number of messages the acknowledging application has
	 * waiting in queue for the receiving application.
	 * 
	 * 消息确认申请数量已接收应用程序队列中等待。
	 * 
	 * 
	 * UsageNotes:
	 * 
	 * These messages would need to be retrieved via queries. The message count
	 * facilitates receiving applications that cannot receive unsolicited
	 * message (i.e., polling).
	 * 
	 * 这些消息将需要通过查询检索。消息计数方便接收应用程序无法接收未经请求的消息（即轮询）。
	 * 
	 * 
	 * Examples:
	 * 
	 * If there are 3 low priority messages, 1 medium priority message and 1
	 * high priority message, the message waiting number would be 5, because
	 * that is the total number of messages.
	 * 
	 * 如果有3个低优先级的消息，1个中等优先级的消息，1个高优先级的消息，等待消息号是5，因为这是邮件总数。
	 */
	private INT_NONNEG messageWaitingNumber;
	/**
	 * Definition: The highest level of importance in the set of messages the
	 * acknowledging application has waiting in queue for the receiving
	 * application.
	 * 
	 * 最高水平的消息确认申请的重要性已经等待队列中接收应用程序。
	 * 
	 * 
	 * UsageNotes:
	 * 
	 * These messages would need to be retrieved via queries. This facilitates
	 * receiving applications that cannot receive unsolicited messages (i.e.,
	 * polling). The specific code specified identifies how important the most
	 * important waiting message is and may affect how soon the receiving
	 * application is required to poll for the message. Priority may be used by
	 * local agreement to determine the timeframe in which the receiving
	 * application is expected to retrieve the messages from the queue
	 * 
	 * 这些消息将需要通过查询检索。这有利于接受申请，无法接收未经请求的消息（即轮询）。指定具体的代码标识，等待最重要的消息是多么的重要，
	 * 并可能会影响接收应用程序需要多久轮询消息。可优先使用本地协议，确定时间表，预计将在接收应用程序从队列中检索消息
	 */
	private CD messageWaitingPriorityCode;

	private List<AcknowledgementDetail> acknowledgementDetail = new ArrayList<AcknowledgementDetail>();

	private Transmission acknowledges;

	private Transmission conveyingTransmission;

	public CS getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(CS typeCode) {
		this.typeCode = typeCode;
	}

	public INT_POS getExpectedSequenceNumber() {
		return expectedSequenceNumber;
	}

	public void setExpectedSequenceNumber(INT_POS expectedSequenceNumber) {
		this.expectedSequenceNumber = expectedSequenceNumber;
	}

	public INT_NONNEG getMessageWaitingNumber() {
		return messageWaitingNumber;
	}

	public void setMessageWaitingNumber(INT_NONNEG messageWaitingNumber) {
		this.messageWaitingNumber = messageWaitingNumber;
	}

	public CD getMessageWaitingPriorityCode() {
		return messageWaitingPriorityCode;
	}

	public void setMessageWaitingPriorityCode(CD messageWaitingPriorityCode) {
		this.messageWaitingPriorityCode = messageWaitingPriorityCode;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public List<AcknowledgementDetail> getAcknowledgementDetail() {
		return acknowledgementDetail;
	}

	public void setAcknowledgementDetail(
			List<AcknowledgementDetail> acknowledgementDetail) {
		this.acknowledgementDetail = acknowledgementDetail;
	}

	public Transmission getAcknowledges() {
		return acknowledges;
	}

	public void setAcknowledges(Transmission acknowledges) {
		this.acknowledges = acknowledges;
	}

	public Transmission getConveyingTransmission() {
		return conveyingTransmission;
	}

	public void setConveyingTransmission(Transmission conveyingTransmission) {
		this.conveyingTransmission = conveyingTransmission;
	}

}
